package com.jyhs.maven.dao;

import com.jyhs.maven.entity.Transfer;
import com.jyhs.maven.entity.dto.TransferRecord;
import com.jyhs.maven.entity.dto.TransferRecordQuery;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.List;

public interface TransferDao {

    int saveTransfer(@Param("transfer") Transfer transfer) throws SQLException, ClassNotFoundException;

    int updateAmount(@Param("userId") Long userId,@Param("amount") BigDecimal amount) throws SQLException, ClassNotFoundException;


    List<TransferRecord> getTransferListByPayUserId(@Param("payUserId") String payUserId,@Param("receviId") String receviId) throws SQLException, ClassNotFoundException;

    /**  获取转账记录列表 */
    List<TransferRecord> getTransferList(TransferRecordQuery query) throws SQLException, ClassNotFoundException, ParseException, IllegalAccessException;

    /**  获取转账记录总数 */
    int getTransferCount(TransferRecordQuery query) throws SQLException, ClassNotFoundException;



}
